home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************************
- ** $Id: qpaintdevicemetrics.h,v 2.4 1998/07/03 00:09:36 hanord Exp $
- **
- ** Definition of QPaintDeviceMetrics class
- **
- ** Created : 941109
- **
- ** Copyright (C) 1992-1998 Troll Tech AS. All rights reserved.
- **
- ** This file is part of Qt Free Edition, version 1.40.
- **
- ** See the file LICENSE included in the distribution for the usage
- ** and distribution terms, or http://www.troll.no/free-license.html.
- **
- ** IMPORTANT NOTE: You may NOT copy this file or any part of it into
- ** your own programs or libraries.
- **
- ** Please see http://www.troll.no/pricing.html for information about
- ** Qt Professional Edition, which is this same library but with a
- ** license which allows creation of commercial/proprietary software.
- **
- *****************************************************************************/
-
- #ifndef QPAINTDEVICEMETRICS_H
- #define QPAINTDEVICEMETRICS_H
-
- #ifndef QT_H
- #include "qwindowdefs.h"
- #include "qpaintdevice.h"
- #include "qpaintdevicedefs.h"
- #endif // QT_H
-
-
- class QPaintDeviceMetrics // paint device metrics
- {
- public:
- QPaintDeviceMetrics( const QPaintDevice * );
-
- int width() const { return (int)pdev->metric(PDM_WIDTH); }
- int height() const { return (int)pdev->metric(PDM_HEIGHT); }
- int widthMM() const { return (int)pdev->metric(PDM_WIDTHMM); }
- int heightMM() const { return (int)pdev->metric(PDM_HEIGHTMM); }
- int numColors() const { return (int)pdev->metric(PDM_NUMCOLORS); }
- int depth() const { return (int)pdev->metric(PDM_DEPTH); }
-
- private:
- QPaintDevice *pdev;
- };
-
-
- #endif // QPAINTDEVICEMETRICS_H
-